import request from '@/utils/request'

// 获取用户列表
export function getUserList(params) {
  return request({
    url: '/sysUser/getPageList',
    method: 'POST',
    params: params
  })
}

// 新增用户
export function addUser(params) {
  return request({
    url: '/sysUser/add',
    method: 'POST',
    params: params
  })
}

// 删除用户
export function removeUser(params) {
  return request({
    url: '/sysUser/delete',
    method: 'POST',
    params: params
  })
}

// 用户信息修改
export function updateUser(params) {
  return request({
    url: '/sysUser/update',
    method: 'POST',
    params: params
  })
}

// 用户获取部门信息
export function getDepartment() {
  return request({
    url: '/sysDepartment/getList',
    method: 'POST'
  })
}

// 用户获取角色信息
export function getRoleInfo() {
  return request({
    url: '/sysRole/getList',
    method: 'post'
  })
}

// 用户密码重置
export function restUserPwd(params) {
  return request({
    url: '/sysUser/resetPassword',
    method: 'post',
    params: params
  })
}

// 用户新增登录账号查重
export function queryRepetition(params) {
  return request({
    url: '/sysUser/checkLoginUser',
    method: 'post',
    params: params
  })
}
